package com.heg.bk.control;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.springframework.stereotype.Controller;

/**
 * 图片上传控制层
 * @author dengxuzhao
 * @version 1.1
 * @time 2016-04-24
 */
@Controller("uploadifyAction")
public class UploadifyAction extends HttpServlet {
	
	public void doGet(HttpServletRequest request, 
			HttpServletResponse response) throws ServletException, IOException {
		this.doPost(request, response);
	}
	
	public void doPost(HttpServletRequest request, 
			HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		response.setContentType("text/html; charset=UTF-8");

		ServletFileUpload upload = new ServletFileUpload(null);
		upload.setHeaderEncoding("UTF-8");
		
	}


}
